#include <header.h>

int main(){

    int fd_w = open("1.pipe", O_WRONLY );
    int fd_r = open("2.pipe", O_RDONLY);

    while(1){
        char buf[100] = {0};
        read(STDIN_FILENO, buf, sizeof(buf));
        write(fd_w, buf, sizeof(buf));

        bzero(buf, sizeof(buf));
        read(fd_r, buf, sizeof(buf));
        printf("b: %s ", buf);

    }

    close(fd_r);
    close(fd_w);
    return 0;
}

